package com.jason.order.feign;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(value = "tcc-account-server")
public interface IAccountService {
    //@TwoPhaseBusinessAction(name = "AccountTccActionOne", commitMethod = "commitAccount", rollbackMethod = "rollbackAccount")
    /**@GetMapping("accountChange/addMoney")
    public String addAmount(BusinessActionContext businessActionContext,
            @BusinessActionContextParameter(paramName = "accId") @RequestParam("accId") Integer accId
            ,@BusinessActionContextParameter(paramName = "amount") @RequestParam("amount") Integer amount);

            public boolean commitAccount(BusinessActionContext businessActionContext);

            public boolean rollbackAccount(BusinessActionContext businessActionContext);
**/
    @GetMapping("accountChange/addMoney")
    public String addAmount(@RequestParam("accId") Integer accId, @RequestParam("amount") Integer amount);


}
